package com.city.dao;

import java.util.List;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class CityDao {

	public List list(){
		  Configuration cfg = new Configuration().configure();
		  SessionFactory sf = cfg.buildSessionFactory();
		  Session session = sf.openSession();
		  return session
				  .createQuery("from City")
				  .list();
	}
}
